package com.toweave.starter.components;

import android.content.Context;
import android.view.LayoutInflater;

import androidx.appcompat.app.AlertDialog;

import com.toweave.starter.R;


public class Loading {
  private AlertDialog dialog;

  public Loading(Context context) {
    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    LayoutInflater inflater = LayoutInflater.from(context);
    builder.setView(inflater.inflate(R.layout.loading_dialog, null));
    builder.setCancelable(false);

    dialog = builder.create();
  }

  public void show() {
    dialog.show();
  }

  public void hide() {
    dialog.dismiss();
  }
}
